home *** CD-ROM | disk | FTP | other *** search
/ 10,000 Great Games / 10,000 Great Games.iso / Product / 66 / data1.cab / Source_Files / Src / Grids.cpp < prev    next >
C/C++ Source or Header  |  2000-01-16  |  452b  |  17 lines

  1. #include "stdafx.h"
  2.  
  3. int view_grid = FALSE;
  4.  
  5. void draw_grid()
  6. {
  7.     int start = game_surface->start;
  8.  
  9.     if (view_grid)
  10.     {
  11.         for (int y = start - start % LEVEL_VTICK; y < start + GAME_DY; y += LEVEL_VTICK)
  12.             dashedline(game_surface, 0, y, GAME_DX - 1, y, gray);
  13.  
  14.         for (int x = GAME_DX / 2 - (GAME_DX / 2 / LEVEL_HTICK) * LEVEL_HTICK; x < GAME_DX; x += LEVEL_HTICK)
  15.             dashedline(game_surface, x, start, x, start + GAME_DY - 1, gray);    
  16.     }
  17. }